/*----------------------------------------------------------------------------
Owner(s): Shane Whitfield
$Copyright: $
$Id: 

Purpose  : Container for all the play
----------------------------------------------------------------------------*/

#pragma once

#include "singleton.h"
#include "nncommand.h"

/*--------------------------------------------------------------------------*/
// Class CCamera declaration.
class CPlayer : public TSingleton<CPlayer>, public CCommandTaker
{

public:
			CPlayer();
			
#if DEBUG
	//CCommandTaker Overrides
	virtual const char*	GetName() const {
							return "player"; }
	virtual void		On_Command(const char* i_command, const char* i_parameters);
#endif
	
	void	SetMineralCount(float i_mineralCount);
	void	AddMinerals(float i_mineralsToAdd);
	void	UseMinerals(float i_mineralToUse);
	bool	HasEnoughMinerals(float i_minerals) const {
				return m_minerals >= i_minerals; }
	float	GetMineralCount() const {
				return m_minerals; }
				
#if DEBUG
	bool	IsInGodMode() const {
				return m_isInGodMode; }
#endif
				
private:

	float	m_minerals;		// the total mineral count this player has
	
#if DEBUG
	bool	m_isInGodMode;	// can any of the nodes under this player be harmed?
#endif
};

inline CPlayer& CPlayer_GetSingleton() { return CPlayer::GetSingleton(); }
#define g_player (CPlayer_GetSingleton())

/*-----------------------------------EOF!-----------------------------------*/